<?php
/**
 * @author: zhouzhongyuan <435690026@qq.com>
 * @copyright 万虎网络
 * @link http://www.wanhunet.com
 */

namespace common\Utils;


class FormatUtil
{
    public static function isFormat($isFormat, $var)
    {
        return
            $isFormat ?
                (
                is_bool($isFormat) ?
                    date("m-d H:i", $var) :
                    date($isFormat, $var)
                ) :
                $var;
    }
}